/* eslint-disable react/jsx-pascal-case */
/* eslint-disable jsx-a11y/alt-text */
import React from 'react';
import Tabbar from '../tabbar'
import cookie from 'react-cookies'
const Business = () => {

    const [LoginUser, setLoginUser] = React.useState(cookie.load('LoginUser') ? cookie.load('LoginUser') : {
        nickname: '', avatar: ''
    })

    let navigate = React.$router.useNavigate();

    const logout = () => {
        React.$Vant.Dialog.confirm({
            message: '确认是否退出登？',
        })
        .then(() => {
            cookie.save('LoginUser', null)
            React.$Vant.Toast.success({
                message: '退出成功',
                onClose: () => {
                    navigate('/business/base/login')
                }
            })
        })
        .catch(() => {})
    }

    return (
        <>
            <div className="my_kuang">
                <div className="bj_img">
                    <img className="beij_s" src="/assets/images/my_beij.jpg" alt="" />
                    <div className="nimetou_gaib">
                        <div className="toux_hou">
                            <img id="Dfgrg" style={{ height: '1.1rem' }} src={LoginUser.avatar} alt="" />
                            <input id="tupian_Sc" type="file" />
                        </div>
                        <div className="mingz">
                            <h2>{LoginUser.nickname}</h2>
                        </div>
                    </div>
                </div>
                <div className="div_bx_k">
                    <div className="neir_Ef">
                        <div className="yverjif">
                            <ul>
                                <li><h2>0</h2><p>收藏文章</p></li>
                                <li><a href="my_cs.html"> <h2>9</h2><p>收藏商品</p></a></li>
                                <li><h2>17</h2><p>订单数量</p></li>
                            </ul>
                        </div>

                        <div className="list_index_my">
                            <div className="fenh_ziyek">
                                <h3>更多服务 </h3>
                            </div>
                            <div className="my_dind">
                                <div className="bt">
                                    <React.$router.NavLink to="/business/base/profile">
                                        <h3><img src="/assets/images/my_x_01.png" />基本资料</h3>
                                        <div className="right">

                                            <img src="/assets/images/right_jiant.png" />
                                        </div>
                                    </React.$router.NavLink>
                                </div>
                            </div>
                            <div className="my_dind">
                                <div className="bt">
                                    <React.$router.NavLink to="/business/lease/index">
                                        <h3><img src="/assets/images/my_x_02.png" />我的订单</h3>
                                        <div className="right">
                                            <img src="/assets/images/right_jiant.png" />
                                        </div>
                                    </React.$router.NavLink>
                                </div>
                            </div>
                            <div className="my_dind">
                                <div className="bt">
                                    <a href="my_guan.html">
                                        <h3><img src="/assets/images/my_x_02.png" />消费记录</h3>
                                        <div className="right">
                                            <img src="/assets/images/right_jiant.png" />
                                        </div>
                                    </a>
                                </div>
                            </div>
                            <div className="my_dind">
                                <div className="bt">
                                    <React.$router.NavLink to="/business/base/about">
                                        <h3><img src="/assets/images/my_x_02.png" />关于我们</h3>
                                        <div className="right">
                                            <img src="/assets/images/right_jiant.png" />
                                        </div>
                                    </React.$router.NavLink>
                                </div>
                            </div>
                            <div className="my_dind">
                                <div className="bt" onClick={logout}>
                                    <a>
                                        <h3><img src="/assets/images/my_x_02.png" />退出登陆</h3>
                                        <div className="right">
                                            <img src="/assets/images/right_jiant.png" />
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>

                    </div>

                </div>
            </div>
            <div style={{ height: '.75rem' }}></div>
            <Tabbar />
        </>
    )
}

export default Business